package com.moli.iov.sys.model.dto.req;

import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author zql
 * @since 2019/9/6 9:43
 */
@Data
public class RoleDto  extends BaseDto implements Serializable {

  private static final long serialVersionUID = 545069879162574626L;

  /**
   * 主键
   */
  @NotNull(message = "角色id不能为空", groups = {UpdateRoleByRoleId.class, SetPermissionThird.class,
      GetRolePermissions.class, SetPermission.class})
  private Long roleId;

  /**
   * 用户类型:1、平台用户 2、企业用户
   */
  private Integer userType;

  /**
   * 不等于角色id
   */
  private Long neRoleId;

  /**
   * 权限集合
   */
  @NotEmpty(message = "权限不能为空", groups = {SetPermissionThird.class, SetPermission.class})
  private List<Long> permissionIds;

  /**
   * 角色id集合
   */
  private List<Long> roleIds;

  /**
   * 角色名称
   */
  @NotEmpty(message = "角色名称不能为空", groups = {SaveRole.class, UpdateRoleByRoleId.class})
  private String roleName;

  /**
   * 完全匹配名称
   */
  private String perfectRoleName;
  /**
   * 角色类型:1、平台角色 2、企业角色
   */
  private Integer roleType;

  /**
   * 企业id
   */
  @NotNull(message = "企业id不能为空", groups = {ListRole.class, ListRoleOfPage.class, SaveRole.class,
      UpdateRoleByRoleId.class, SetPermissionThird.class, GetRolePermissions.class, GetRoleCount.class})
  private Long companyId;

  /**
   * 企业名称
   */
  private String companyName;

  /**
   * 角色状态:1、启用 0、禁用
   */
  @NotNull(message = "角色状态不能为空", groups = {SaveRole.class, UpdateRoleByRoleId.class})
  private Integer status;

  /**
   * 角色说明
   */
  @NotEmpty(message = "角色描述不能为空", groups = {SaveRole.class, UpdateRoleByRoleId.class})
  private String memo;

  /**
   * 操作人id
   */
  private Long operatorId;

  /**
   * 操作人名称
   */
  private String operatorName;

  private Long userId;

  public interface ListRole{}

  public interface ListRoleOfPage{}

  public interface SaveRole{}

  public interface UpdateRoleByRoleId{}

  public interface SetPermissionThird{}

  public interface SetPermission{}

  public interface GetRolePermissions{}

  public interface GetRoleCount{}

}
